<?php
/**
 * Barra lateral    
 *
 * @package WordPress
 * @subpackage Observatorio de Cultura y Economia - Dev
 * @since Observatorio de Cultura y Economia - Dev 0.1
 */
?>
    <div class="span-11 last" id="sidebar">
        <div class="span-10 last borde-sidebar fondo-blanco" id="sidebar-inner">
            <div class="span-11 last" id="boletin">
                <div id="boletin-inner">
                    <h3>Bolet&iacute;n Electr&oacute;nico</h3>
                    <!-- Mostrar 1 posts de Boletín -->
                    <h2><a href="<?php custom_loop_link(1, Boletin); ?>">
                        <?php custom_loop_title(1, Boletin); ?></a></h2>
                    <p><?php custom_loop_excerpt(1, Boletin); ?></p>
                    <a href="<?php custom_loop_link(1, Boletin); ?>"><p class="vermas-rojo">Ver m&aacute;s</p></a>
                    <h3>Suscríbase al boletín</h3>
                    <?php if (class_exists('MailPress')) MailPress ::form(array('txtbutton' => 'Enviar')); ?>
                </div><!-- end boletin inner -->
            </div><!-- end boletin -->
            <div class="clear span-11 last" id="noticias">
                <div id="noticias-inner">
                    <h3>Noticias</h3>
                    <!-- Mostrar dos noticias -->
                    <?php $custom_posts = get_posts('numberposts=2&category_name=noticias'); ?>
                    <?php foreach ($custom_posts as $post) : setup_postdata($post); ?>
                    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                    <P><?php the_excerpt(); ?></P>
                    <a href="<?php the_permalink(); ?>"><p>Ver m&aacute;s</p></a>
                    <?php endforeach; ?>
                    <?php wp_reset_query(); ?>
                </div><!-- end noticias-inner -->
            </div><!-- end noticias -->
            <div class="clear span-11 last" id="calendario">
                <div id="widget-zone">
                    <h2>Eventos Culturales</h2>
                    <?php ec3_get_calendar(); ?>    
                </div><!-- end widget zone -->
                <?php if (is_sidebar_active('primary_sidebar')) : ?>
                <div id="widget-zone-main">
                    <?php dynamic_sidebar('primary_sidebar'); ?>
                </div>
                <?php endif; ?>
            </div><!-- end calendario -->
        </div><!-- end sidebar-inner -->
    </div> <!-- end sidebar -->